<template>
  <button @click="btnClick">点击触发</button>

  {{ a }}
</template>

<script lang="ts" setup>
import { reactive, ref } from "vue";
type Sn = String | Number;
let a = ref(0);

// interface UserList {
//   value: Array<{
//     id: Number;
//     name: String;
//     gender: Sn;
//   }>;
// }
interface UserList {
  id: Number;
  name: String;
  gender: Sn;
}
let userList: UserList = reactive({ id: 1, name: "", gender: "" });

let btnClick = (): number => {
  ++a.value;
  nullClick();
  console.log(a.value);
  return a.value;
};
let nullClick = (): void => {
  console.log("null");
};
console.log(userList);
</script>

<style lang="scss" scoped></style>
